Skip to content

Conversation

@noti0na1
Copy link
Member

Fix #24206

Although T | Null is definitely a more correct signature for Option.apply (and one of the main motivation why we updated the stdlib), we decide to revert the changes related to Option.apply to avoid any breaking change in regular projects.

See discussion in #24206

@noti0na1 noti0na1 marked this pull request as ready for review October 22, 2025 14:33
@noti0na1 noti0na1 requested a review from a team as a code owner October 22, 2025 14:33
@noti0na1 noti0na1 self-assigned this Oct 22, 2025
@noti0na1 noti0na1 merged commit d8ddcfb into scala:main Oct 22, 2025
51 checks passed
@noti0na1 noti0na1 deleted the revert-nullable-option-apply branch October 22, 2025 21:43
hamzaremmal added a commit to hamzaremmal/scala3 that referenced this pull request Oct 23, 2025
hamzaremmal added a commit to hamzaremmal/scala3 that referenced this pull request Oct 23, 2025
hamzaremmal added a commit that referenced this pull request Oct 24, 2025
…mNullable` (#24238)

Yes, this is not the most ideal signature for `Option.apply` but it
allows at least to drop `Option.fromNullable` and an easier migration to
explicit nulls (no need to add `fromNullable` everywhere).

Superseed #24231 in the sense where we focus here on the nullability
issue rather than the more global issue.

Reverts #24230
Relates to #24206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues with Scala Standard Library using -Yexplicit-nulls

2 participants